<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +-------------------------------------------------------------------

use think\Route;

//后台

// 登录
Route::get('admin/login','admin/Login/index');
Route::post('admin/dologin','admin/Login/dologin');

// 注销
Route::get('logout','admin/Logout/index');


// 后台用户中心
Route::get('user/delete','admin/User/delete');
// 搜索
Route::post('user/search','admin/User/doSearch');

Route::get('user/role','admin/User/role');
Route::post('user/dorole','admin/User/doRole');
Route::get('user/edit','admin/User/edit');
Route::put('user/update','admin/User/update');
Route::get('user/create','admin/User/create');
Route::post('user/save','admin/User/save');
Route::get('user','admin/User/index');


// 角色管理列表页
Route::get('role/delete','admin/Role/delete');
Route::get('role','admin/Role/index');
// 搜索
Route::post('role/search','admin/Role/doSearch');
Route::post('role/donode','admin/Role/donode');
Route::get('role/node','admin/Role/node');
Route::get('role/status','admin/Role/doStatus');
Route::get('role/create','admin/Role/create');
Route::post('role/save','admin/Role/save');
Route::get('role/edit','admin/Role/edit');
Route::put('role/update','admin/Role/update');
Route::get('role$','admin/Role/index');

// 权限管理
Route::get('node/delete','admin/Node/delete');
Route::get('node/edit','admin/Node/edit');
Route::put('node/update','admin/Node/update');
Route::resource('node','admin/Node');
Route::get('node/status','admin/Node/doStatus');
Route::get('node/create','admin/Node/create');
Route::post('node/save','admin/Node/save');
Route::get('node','admin/Node/index');
// 搜索
Route::post('node/search','admin/Node/doSearch');

// 前台用户模块
Route::get('huser/block','admin/Huser/blockList');
Route::get('huser/edit','admin/Huser/edit');
Route::put('huser/update','admin/Huser/update');
Route::get('huser/status','admin/Huser/doStatus');
Route::get('block','admin/Huser/block');
Route::get('huser/create','admin/Huser/create');
Route::get('huser/read','admin/Huser/read');
Route::post('huser/save','admin/Huser/save');
Route::get('huser','admin/Huser/index');

// 房源信息管理
Route::get('house/delete','admin/House/delete');
Route::get('house/edit','admin/House/edit');
Route::put('house/update','admin/House/update');
Route::get('house/hot','admin/House/doHot');
Route::get('house/create','admin/House/create');
Route::get('house/read','admin/House/read');
Route::post('house/save','admin/House/save');
Route::get('house','admin/House/index');

// 房源审核管理

Route::get('review/edit','admin/Review/edit');
Route::put('review/update','admin/Review/update');
Route::get('review/review','admin/Review/doReview');
Route::get('review','admin/Review/index');

// 房屋图片管理
Route::get('imgs','admin/Imgs/index');

// 户型管理
Route::get('type/delete','admin/Type/delete');
Route::get('type/edit','admin/Type/edit');
Route::put('type/update','admin/Type/update');
Route::get('type','admin/Type/index');
Route::get('type/status','admin/Type/doStatus');
Route::post('type/search','admin/Type/doSearch');
Route::get('type/create','admin/Type/create');
Route::get('type/read','admin/Type/read');
Route::post('type/save','admin/Type/save');
Route::get('type','admin/Type/index');



// 首页
Route::get('admin$','admin/Index/index');




//前台


// 登录
Route::get('login','index/login/index');
Route::post('doLogin','index/login/doLogin');
// 注册
Route::get('register/emial','index/register/email');
Route::get('register','index/register/index');
Route::post('doregister','index/register/register');
Route::get('telcode','index/register/getTelCode');
// 租房页面
Route::get('rent','index/Rent/index');
// 前台首页
Route::get('/','index/Index/index');





return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
